﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentFilters;
using Microsoft.Practices.Unity;

namespace Website.Core
{
    public class UnityFilterRegistry: FilterRegistry
    {
        #region Fields

        private readonly IUnityContainer _container;

        #endregion

        #region Constructor

        public UnityFilterRegistry(IUnityContainer container)
        {
            _container = container;
        }

        #endregion

        public override object GetFilterInstance(Type filterType)
        {
            return _container.Resolve(filterType);
        }
    }
}
